package org.arch_learn.java_spi.demo;

import org.arch_learn.dubbo_demo.api.HelloService;

import java.util.ServiceLoader;

public class JavaSpiMain {
    public static void main(String[] args) {
        ServiceLoader<HelloService> services = ServiceLoader.load(HelloService.class);
        for (HelloService helloService : services) {
            System.out.println(helloService.getClass().getName() + ":" + helloService.sayHello("world"));
        }
    }
}
